function y = ltrvec(x)
% LTRVEC(X)
%   stacks the lower triangular elements of a matrix

% February 28, 2002
% Sungbae An
n = size(x,1);
y = x(find(tril(ones(n,n))));